﻿@model Article
@using CP_SchoolForChildren_v0._1.Models.DataModel
@{
    ViewBag.Title = "Tạo bài viết mới";
    Layout = "~/Views/Shared/FE/_Layout_FE_Index.cshtml";
    @ViewBag.Message
    SFCEntities db = new SFCEntities();
}
<script src="@Url.Content("~/Scripts/FE/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/FE/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/FE/tinymce/jquery.tinymce.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/FE/Addition.css")" rel="stylesheet" type="text/css" />
<style type="text/css">
    .field-validation-error {
        padding: 5px;
        line-height: 28px;
    }
</style>
<div class="allhome" style="padding-top: 15px;">
   <form action="@Url.Action("Create","Article")" method="POST">
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.UserID)
        @Html.HiddenFor(model => model.CreatedTime)
        <style>
            .edit-text-title {
                float: left; 
                padding: 5px; 
                width: 100px; 
                text-align: right;
            }
        </style>
        <div class="category-edit-article">
            <p class="edit-text-title">Chuyên mục:</p>
 
            @Html.DropDownList("CategoryID")
            <br class="spacer"/>
        </div>
        <div style="margin-bottom: 15px; ">
            <p class="edit-text-title">Tiêu đề:</p>
            <input type="text" value="@Model.Title" name="Title" id="Title" class="searchInput" style="width: 400px;">
            @Html.ValidationMessageFor(model => model.Title)
            <br class="spacer"/>
        </div>
        <p class="edit-text-title">Nội dung:</p>
        <div class="editor-field" style="margin-left: 5px;float:left; border: 3px solid #EBE6E2;">
            <div style="border: 1px solid #CCCCCC;">
                @Html.ValidationMessageFor(model => model.ArticleContent)
            </div>
            @Html.EditorFor(model => model.ArticleContent)
        </div>
        <br class="spacer"/>
       
      <div style="margin-left: 105px; padding-top: 20px;">
            <input type="submit" class="btn" value="Tạo bài mới" onclick="check()" />
            <input type="button" class="btn" value="Hủy bỏ" onclick="location.href= '@Url.Action("ArticleManagement","Article")'" />
        </div>
    </form>
    <br class="spacer"/>
</div>